<template>
	<view class="page">
		<view class="tabs">
			<view class="tab_item" :class="{tab_item_act: type == 0}" @click="type = 0">
				支出
			</view>
			<view class="tab_item" :class="{tab_item_act: type == 1}" @click="type = 1">
				收入
			</view>
		</view>
		<view class="categories_list">
			<view class="categories_item" :class="{categories_item_act: item == 2}" v-for="item in 6">
				<image class='icon' src="../../static/logo.png" mode="aspectFit"></image>
				<view class="name">
					餐饮
				</view>
			</view>
		</view>
		<view class="keyboard">
			<view class="top_box">
				<view class="remark">
					<u--input
					    placeholder="请输入备注"
					    border="surround"
					  ></u--input>
				</view>
			</view>
			<cusKeyboardVue />
		</view>
	</view>
</template>

<script>
	import cusKeyboardVue from '../../components/cusKeyboard/cusKeyboard.vue';
	export default {
		components: {
			cusKeyboardVue
		},
		data() {
			return {
				type: 0,
			};
		},
		methods: {
			leftClick() {
				uni.reLaunch({
					url: '/pages/index/index'
				});
			}
		}
	}
</script>

<style lang="scss">
.page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: 30rpx;
	.tabs {
		display: flex;
		justify-content: space-around;
		.tab_item {
			width: max-content;
			&.tab_item_act {
				border-bottom: 8rpx solid #01CD83;
			}
		}
	}
	.categories_list {
		flex-grow: 1;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		align-content: start;
		gap: 20rpx;
		justify-items: center;
		align-items: center;
		margin: 30rpx 0;
		.categories_item {
			width: max-content;
			height: max-content;
			padding: 30rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			.icon {
				width: 60rpx;
				height: 60rpx;
			}
			&.categories_item_act {
				border-radius: 10rpx;
				border: 1rpx solid #01CD83;
			}
		}
	}
	.keyboard {
		
	}
}
</style>